<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="layout">
	<tiles:putAttribute name="head">
		<script type="text/javascript">
			$(function() {
				$("form").Validform({
					ajaxPost : true,
					tiptype : ValidUtils.siblingTip,
					callback : function(data) {
						helper.showMsg(data, {
							okHandler : function() {
								location = "../log/viewLogByTime.action?id=" + data.student.id;
							}
						});
					}
				});
			});
		</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<ul class="breadcrumb">
			<li><a href="preConsultVisit">预约访问</a> <span class="divider">/</span></li>
			<li class="active">访问登记</li>
		</ul>
		<form class="form-horizontal" action="doConsultVisit">
			<input name="id" value="${student.id}" type="hidden">
			<div class="row-fluid">
				<div class="span6">
					<fieldset>
						<legend>学员信息</legend>
						<div class="control-group">
							<label class="control-label">内部编号</label>
							<div class="controls">
								<input type="text" value="${student.no}" readonly="readonly" disabled="disabled">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">姓名</label>
							<div class="controls">
								<input type="text" name="name" value="${student.name}" readonly="readonly" disabled="disabled">
							</div>
						</div>
						<div class="control-group">
							<div class="controls">
								<s:url id="viewLogByTime" action="viewLogByTime" namespace="/log">
									<s:param name="id" value="#student.id"></s:param>
								</s:url>
								<a href="${viewLogByTime}">档案详情</a>
							</div>
						</div>
					</fieldset>
				</div>
				<div class="span6">
					<fieldset>
						<legend>咨询登记</legend>
						<div class="control-group">
							<label class="control-label">来访</label>
							<div class="controls">
								<select name="source">
									<option>电话预约</option>
									<option>活动通知</option>
									<option>主动上门</option>
								</select>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">咨询课程</label>
							<div class="controls">
								<select name="courseId">
									<option value="">未设置</option>
									<s:iterator value="#courses" var="course">
										<option value="${course.id}">${course.name}</option>
									</s:iterator>
								</select>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">说明</label>
							<div class="controls">
								<input type="text" name="title">
							</div>
						</div>
						<div class="control-group">
							<div class="controls">
								<button class="btn btn-primary">
									<i class="icon-white icon-ok"></i>提交
								</button>
							</div>
						</div>
					</fieldset>
				</div>
			</div>
		</form>
	</tiles:putAttribute>
</tiles:insertDefinition>